<template>
    <div>
        <div >子组件</div>
        <h3>{{ params }}</h3>
        <h3>{{ testMsg }}</h3>
        <h3>{{ test }}</h3>
    </div>
<img v-bind="$attrs" >
</template>
<script setup>
import { defineProps, ref, defineExpose, inject } from 'vue'
const props = defineProps({
    params: {
        type: String,
        default: 'default'
    }
})
const test = inject('test')

const testMsg = ref("测试")
defineExpose({ testMsg })
</script>